package com.ruoyi.stock.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.stock.mapper.StockHeaderSetttingMapper;
import com.ruoyi.stock.domain.StockHeaderSettting;
import com.ruoyi.stock.service.IStockHeaderSetttingService;

/**
 * 表头设置Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-30
 */
@Service
public class StockHeaderSetttingServiceImpl implements IStockHeaderSetttingService 
{
    @Autowired
    private StockHeaderSetttingMapper stockHeaderSetttingMapper;

    /**
     * 查询表头设置
     * 
     * @param id 表头设置主键
     * @return 表头设置
     */
    @Override
    public StockHeaderSettting selectStockHeaderSetttingById(Long id)
    {
        return stockHeaderSetttingMapper.selectStockHeaderSetttingById(id);
    }

    /**
     * 查询表头设置列表
     * 
     * @param stockHeaderSettting 表头设置
     * @return 表头设置
     */
    @Override
    public List<StockHeaderSettting> selectStockHeaderSetttingList(StockHeaderSettting stockHeaderSettting)
    {
        return stockHeaderSetttingMapper.selectStockHeaderSetttingList(stockHeaderSettting);
    }

    /**
     * 新增表头设置
     * 
     * @param stockHeaderSettting 表头设置
     * @return 结果
     */
    @Override
    public int insertStockHeaderSettting(StockHeaderSettting stockHeaderSettting)
    {
        stockHeaderSettting.setCreateTime(DateUtils.getNowDate());
        return stockHeaderSetttingMapper.insertStockHeaderSettting(stockHeaderSettting);
    }

    /**
     * 修改表头设置
     * 
     * @param stockHeaderSettting 表头设置
     * @return 结果
     */
    @Override
    public int updateStockHeaderSettting(StockHeaderSettting stockHeaderSettting)
    {
        stockHeaderSettting.setUpdateTime(DateUtils.getNowDate());
        return stockHeaderSetttingMapper.updateStockHeaderSettting(stockHeaderSettting);
    }

    /**
     * 批量删除表头设置
     * 
     * @param ids 需要删除的表头设置主键
     * @return 结果
     */
    @Override
    public int deleteStockHeaderSetttingByIds(Long[] ids)
    {
        return stockHeaderSetttingMapper.deleteStockHeaderSetttingByIds(ids);
    }

    /**
     * 删除表头设置信息
     * 
     * @param id 表头设置主键
     * @return 结果
     */
    @Override
    public int deleteStockHeaderSetttingById(Long id)
    {
        return stockHeaderSetttingMapper.deleteStockHeaderSetttingById(id);
    }
}
